package com.zyf.Service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zyf.Service.UserService;
import com.zyf.entity.User;
import com.zyf.mapper.UserMapper;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;

/**
 * @author zhaoYuFei
 */
@Service("myUserService")
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {
    @Resource
    private UserMapper userMapper;

    @Override
    public User getByUsername(String username) {
        return userMapper.selectOne(new QueryWrapper<User>().eq("username", username));
    }
}
